Optimal. Leaf size=74 \[ \frac{\left (3+\sqrt{5}\right )^{3/2} \tan ^{-1}\left (\sqrt{\frac{1}{2} \left (3+\sqrt{5}\right )} x\right )}{2 \sqrt{10}}-\frac{1}{10} \sqrt{180-80 \sqrt{5}} \tan ^{-1}\left (\sqrt{\frac{2}{3+\sqrt{5}}} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0450255, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {1166, 203} \[ \frac{\left (3+\sqrt{5}\right )^{3/2} \tan ^{-1}\left (\sqrt{\frac{1}{2} \left (3+\sqrt{5}\right )} x\right )}{2 \sqrt{10}}-\frac{1}{10} \sqrt{180-80 \sqrt{5}} \tan ^{-1}\left (\sqrt{\frac{2}{3+\sqrt{5}}} x\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1166
Rule 203
Rubi steps
\begin{align*} \int \frac{3+x^2}{1+3 x^2+x^4} \, dx &=\frac{1}{10} \left (5-3 \sqrt{5}\right ) \int \frac{1}{\frac{3}{2}+\frac{\sqrt{5}}{2}+x^2} \, dx+\frac{1}{10} \left (5+3 \sqrt{5}\right ) \int \frac{1}{\frac{3}{2}-\frac{\sqrt{5}}{2}+x^2} \, dx\\ &=-\frac{1}{5} \sqrt{45-20 \sqrt{5}} \tan ^{-1}\left (\sqrt{\frac{2}{3+\sqrt{5}}} x\right )+\frac{\left (3+\sqrt{5}\right )^{3/2} \tan ^{-1}\left (\sqrt{\frac{1}{2} \left (3+\sqrt{5}\right )} x\right )}{2 \sqrt{10}}\\ \end{align*}
Mathematica [A] time = 0.099855, size = 73, normalized size = 0.99 \[ \frac{\left (3+\sqrt{5}\right )^{3/2} \tan ^{-1}\left (\sqrt{\frac{1}{2} \left (3+\sqrt{5}\right )} x\right )-\left (3-\sqrt{5}\right )^{3/2} \tan ^{-1}\left (\sqrt{\frac{2}{3+\sqrt{5}}} x\right )}{2 \sqrt{10}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.064, size = 104, normalized size = 1.4 \begin{align*} 2\,{\frac{1}{-2+2\,\sqrt{5}}\arctan \left ( 4\,{\frac{x}{-2+2\,\sqrt{5}}} \right ) }+{\frac{6\,\sqrt{5}}{-10+10\,\sqrt{5}}\arctan \left ( 4\,{\frac{x}{-2+2\,\sqrt{5}}} \right ) }+2\,{\frac{1}{2+2\,\sqrt{5}}\arctan \left ( 4\,{\frac{x}{2+2\,\sqrt{5}}} \right ) }-{\frac{6\,\sqrt{5}}{10+10\,\sqrt{5}}\arctan \left ( 4\,{\frac{x}{2+2\,\sqrt{5}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} + 3}{x^{4} + 3 \, x^{2} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.54818, size = 421, normalized size = 5.69 \begin{align*} \frac{2}{5} \, \sqrt{5} \sqrt{-4 \, \sqrt{5} + 9} \arctan \left (\frac{1}{4} \, \sqrt{2 \, x^{2} + \sqrt{5} + 3}{\left (\sqrt{5} \sqrt{2} + 3 \, \sqrt{2}\right )} \sqrt{-4 \, \sqrt{5} + 9} - \frac{1}{2} \,{\left (\sqrt{5} x + 3 \, x\right )} \sqrt{-4 \, \sqrt{5} + 9}\right ) + \frac{2}{5} \, \sqrt{5} \sqrt{4 \, \sqrt{5} + 9} \arctan \left (\frac{1}{4} \,{\left (\sqrt{2 \, x^{2} - \sqrt{5} + 3}{\left (\sqrt{5} \sqrt{2} - 3 \, \sqrt{2}\right )} - 2 \, \sqrt{5} x + 6 \, x\right )} \sqrt{4 \, \sqrt{5} + 9}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.165928, size = 46, normalized size = 0.62 \begin{align*} 2 \left (\frac{\sqrt{5}}{5} + \frac{1}{2}\right ) \operatorname{atan}{\left (\frac{2 x}{-1 + \sqrt{5}} \right )} - 2 \left (\frac{1}{2} - \frac{\sqrt{5}}{5}\right ) \operatorname{atan}{\left (\frac{2 x}{1 + \sqrt{5}} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12001, size = 55, normalized size = 0.74 \begin{align*} \frac{1}{5} \,{\left (2 \, \sqrt{5} - 5\right )} \arctan \left (\frac{2 \, x}{\sqrt{5} + 1}\right ) + \frac{1}{5} \,{\left (2 \, \sqrt{5} + 5\right )} \arctan \left (\frac{2 \, x}{\sqrt{5} - 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]